﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace KaiXin.DAL.XML
{
    public class Log
    {
        const string LOG_FILE = "c:\\LOG.TXT";

        public static void WriteLog(string data)
        {
            WriteLog(data, LOG_FILE);
        }

        public static void WriteLog(string data, string path)
        {
            FileInfo file = new FileInfo(path);
            StreamWriter sw;
            if (!file.Exists)
            {
                sw = file.CreateText();
            }
            else
            {
                sw = file.AppendText();
            }
            sw.WriteLine(data);
            sw.Close();
        }
    }
}
